package subject

import (
	"fmt"
	"github.com/gin-gonic/gin"
	apis "vrcm/src/vrcm/app/admin/apis/subject"
	"vrcm/src/vrcm/app/admin/router"
)

func init() {
	fmt.Println()
	router.NoCheckRole = append(router.NoCheckRole, registerStatisticsRouter)
}

// registerStatisticsRouter
func registerStatisticsRouter(v1 *gin.RouterGroup) {
	api := apis.Statistics{}
	r := v1.Group("/statistics")
	{
		r.POST("/get-statistics-by-subject", api.GetStatisticsBySubject)
		r.POST("/get-per-subject-statistics-by-filter", api.GetPerSubjectStatisticsByFilter)
		r.POST("/get-statistics-by-account", api.GetStatisticsByAccount)
		r.POST("/get-per-statistics-by-account", api.GetPerStatisticsByAccount)
		r.POST("/get-vote-statistics", api.GetVoteStatistics)
		r.POST("/get-vote-statistics-detail", api.GetVoteStatisticsDetail)
		r.POST("/get-question-statistics", api.GetQuestionStatistics)
		r.POST("/get-question-statistics-detail", api.GetQuestionStatisticsDetail)
		r.POST("/get-sign-in-statistics", api.GetSignInStatistics)
		r.POST("/get-sign-in-statistics-detail", api.GetSignInStatisticsDetail)
		r.POST("/get-likes-statistics", api.GetLikesStatistics)
		r.POST("/get-likes-statistics-detail", api.GetLikesStatisticsDetail)
	}
}
